home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1993 December
/
PSL Monthly Shareware CD-ROM (December 1993).iso
/
prgmming
/
dos
/
c
/
layoutc.exe
/
LAYOUT.DOC
< prev
next >
Wrap
Text File
|
1992-01-27
|
6KB
|
171 lines
Layout
Version 1.0
Copyright (c) 1991
Lincoln Beach Software
What Is Layout?
LAYOUT is a program that will read any ASCII report layout generated by an
editor or word processor that will automatically generate the 'C' source code
necessary to recreate the desired report layout.
What You Should Have Received?
There were five files that should have been include with this package. They
are:
LAYOUT.COM - The code generator.
SAMPLE.RPT - Example of a report layout.
SAMPLE.C - Code generated from SAMPLE.RPT.
REPORT.C - Program with code incorporated from SAMPLE.C.
LAYOUT.DOC - This documentation.
Guidelines:
There are only a few guidelines to follow when creating your report layout.
When creating placeholders in a line you must start them with a %, just like
the printf() function. The '%' sign counts as the first character in the
string. This means that if you want to reserve a space of 10 characters you
would have a percent sign followed by 9 s's and at the end of the line you
will put the variable that would fit into the placeholder. Before typing in
the variable names you must start it with the pipe '|' symbol. This key is
over the backslash on most keyboards. This would look like:
This is my string %sssssssss |my_string
and would create the line of code:
fprintf(stdprn,"This is my string %-10s \n\r",my_string);
If there were any spaces between the last 's' and the '|' then they would be
included in quotes as shown.
There are five different types of placeholders. They are:
c - character field
s - strings
d - integers
x - hex numbers
f - floating point numbers
You can use the percent sign in your report but if it is followed by any of
these letters it will create a placeholder for a variable.
Error Checking:
Some error checking has been built into this system. It will keep track of
how many placeholders and how many variables are in each line, if any, and
report and discrepancies during the conversion.
Some Defaults:
All string fields are left justified with the '-' directly after the percent
sign. Also all code is written as if to be sent to the standard printer set
up by DOS, hence the stdprn command. All tabs are also treated as 8 spaces.
Warnings:
The last line in the report layout must be terminated with a new line
character or the last ');' will not be include in the code.
When you use single characters they will take up two spaces on the layout
but in actuality they really only take up one space. You will have to
adjust your layout accordingly.
Help:
Study the file SAMPLE.RPT and this will show you how to set up your layout.
Creating Your First Layout:
After you design your layout save it as an ASCII file. Exit your editor or
word processor and run LAYOUT. You will need to enter in the layout file
name and the filename you wish the code to be generated into. Such As:
LAYOUT SAMPLE.RPT SAMPLE.C
You then can import the file SAMPLE.C into your own source code and do with
it what you wish.
COPYRIGHT & SHAREWARE NOTICE
The software contained in this package is Shareware. This means that
you have a period of time to try it and after that period if you wish
to continue to use it, you must register your use by filling out the
registration form and mailing it and the registration fee to Lincoln
Beach Software. This software and documentation is protected under the
United States Copyright Laws. This product may be distributed and copied
freely, provided there is no charge for the use of this package. The
only charge may be for distribution and copying services. Your support
of Shareware is appreciated.
LAYOUT V1.0
REGISTRATION FORM
Please answer the registration questionnaire below and return this form with
your cash, check or money order to :
Lincoln Beach Software
P.O. Box 1554
Ballwin, MO 63022
Phone: (314) 227-2431
Firm __________________________________________________________________
Address _______________________________________________________________
_______________________________________________________________
_______________________________________________________________
_______________________________________________________________
Phone (_____)_____-______ Occupation _________________________________
Type of computer(s) you own ___________________________________________
DOS version _____
Where did you get LAYOUT from:
BBS Name ________________________________ Number (_____)_____-______
Other ______________________________________________________________
____ LAYOUT Registration ................. $ 10.00 ea $ _______
(Includes latest version of program diskette)
____ INSTALL-IT Registration.............. $ 35.00 ea $ _______
Customizable Installation Program
for developers.
Non-US Shipping........................ $ 5.00 ea $ _______
(Payments must be in US Dollars, US bank)
TOTAL Enclosed ........................................ $ _______
Non-U.S. orders need to include $5.00 extra to cover additional
shipping and handling charges. Checks and money orders must be
drawn on a U.S. bank. Please send all payments payable in U.S. Dollars.